
//- This Source Code Form is subject to the terms of the Mozilla Public
//- License, v. 2.0. If a copy of the MPL was not distributed with this
//- file, You can obtain one at http://mozilla.org/MPL/2.0/.
//-
//- Copyright (c) 2021-present Kaleidos Ventures SL

.story-row(
    ng-class="{'is-blocked': vm.story.get('is_blocked'), 'is-closed': vm.story.get('is_closed')}"
    ng-hide="!vm.options.closed_us && vm.story.get('is_closed')"
)
    .name(ng-if="vm.options.name")
        .name-container
            - var hash = "#";
            a(
                tg-nav="project-userstories-detail:project=vm.story.getIn(['project_extra_info', 'slug']),ref=vm.story.get('ref')"
                ng-attr-title="{{::vm.story.get('subject')}}"
            )
                span.ref(ng-bind-html="'#'+vm.story.get('ref')")
                span.subject(ng-bind-html="vm.story.get('subject') | emojify")
            tg-belong-to-epics(
                ng-if="vm.story.get('epics')"
                format="pill"
                epics="vm.story.get('epics')"
            )
    .project(
        ng-if="vm.options.project"
        tg-nav="project:project=vm.story.getIn(['project_extra_info', 'slug'])"
    )
        img(
            tg-project-logo-small-src="::vm.story.get('project_extra_info')"
            alt="{{::vm.story.getIn(['project_extra_info', 'name'])}}"
            title="{{::vm.story.getIn(['project_extra_info', 'name'])}}"
        )
    .sprint(ng-if="vm.options.sprint") {{::vm.story.get('milestone_name')}}
    .assigned(ng-if="vm.options.assigned && vm.story.get('assigned_to')")
        img(
            tg-avatar="vm.story.get('assigned_to_extra_info')"
            alt="{{::vm.story.getIn(['assigned_to_extra_info', 'full_name_display'])}}"
        )
    .assigned(ng-if="vm.options.assigned && !vm.story.get('assigned_to')")
        img(
            src="#{v}/images/unnamed.png"
            alt="{{EPICS.DASHBOARD.UNASSIGNED | translate}}"
        )
    .status-holder(ng-if="vm.options.status") {{vm.story.getIn(['status_extra_info', 'name'])}}
    .progress(ng-if="vm.options.progress")
        .progress-bar
        .progress-status(
            ng-if="::vm.percentage"
            ng-style="{'width':vm.percentage}"
        )
